#!/usr/bin/python3 
# -*- coding: utf-8 -*-
"""
@File Name  : txt.py
@Author     : LeeCQ
@Date-Time  : 2019/12/31 19:23

下载小说 - 到数据库 & uFile - /HH/9c/txt
"""
import sys
sys.path.append('.')

import re
try:
    from _root import *
except:
    from HTTP.Download_9C_2._root import *


class NineCTxt(Root9C):

    def __init__(self, retry=5, timeout=10, debug_level=0, strict_mode=True,  _data_path=DATA_PATH,
                 local_root='./album', remote_root='/HH/9C/txt'):
        super().__init__(retry=retry, timeout=timeout, debug_level=debug_level,
                         strict_mode=strict_mode, data_path=_data_path,
                         )

    # 取得pic的typeID & data
    def pic_allData(self):
        return [_id.setdefault('data', self.read_data(_id['id']))
                for _id in sort_relation if _id['type'] == 'pic'
                ]